﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GS1.Library;

namespace SegIdenMovil
{
    public partial class frmRecImpBultoAvance : Form
    {
        #region --- Constructor ---
        public frmRecImpBultoAvance()
        {
            InitializeComponent();
        }
        #endregion

        #region --- Eventos Formulario ---
        private void frmRecImportacion_Load(object sender, EventArgs e)
        {
            cargarFormulario();
        }

        private void mnuSalir_Click(object sender, EventArgs e)
        {
            salir();
        }
        #endregion

        #region --- Metodos Propios ---
        private void cargarFormulario()
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                this.WindowState = FormWindowState.Maximized;

                DataTable tbBultos = new DataTable();

                tbBultos.Columns.AddRange(new DataColumn[] { new DataColumn("CodigoBulto",typeof(string)),
                                                         new DataColumn("Guia", typeof(string)),
                                                         new DataColumn("CodigoItemProveedor", typeof(string)) });

                tbBultos.Rows.Add(new object[] { "B01212", "G001", "1233,2131,2344" });
                tbBultos.Rows.Add(new object[] { "B01213", "G002", "1232,2231" });
                tbBultos.Rows.Add(new object[] { "B01214", "G003", "2123" });

                this.dgListado.RowHeadersVisible = false;
                this.dgListado.DataSource = tbBultos;
            }
            catch (Exception ex)
            {
                Util.MensajeError(ex, this.Text);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }

        private void salir()
        {
            this.Close();
        }
        #endregion
    }
}